﻿using Infrastructure.ElasticSearch.Models;
using Newtonsoft.Json;

namespace Infrastructure.ElasticSearch.ParentChilds
{
    public static class JsonConvertExtension
    {
        public static string ToJsonByElasticSearch(this EsAggregateRoot aggregateRoot)
        {
            return JsonConvert.SerializeObject(aggregateRoot, new EsJsonSerializerSettings());
        }
    }
}
